<%--
  Created by IntelliJ IDEA.
  User: 彭海鑫
  Date: 2021/9/16
  Time: 15:19
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<html>
<head>
    <title>Title</title>
    <script src="/untitled2_war_exploded/kaoshi/jquery-1.12.4.js"></script>
    <script type="text/javascript">
        $(function () {
            $("table tr:even").css("background","#6e6e6e");
            $("table tr:odd").css("background","#ababab");
    </script>
</head>
<body>
<a href="/untitled2_war_exploded/chaxvnServlet">查询</a>
<table border="1px">
    <tr>
        <td>编号</td>
        <td>名字</td>
        <td>性别</td>
        <td>年龄</td>
        <td>等级</td>
        <td>部门</td>
    </tr>
    <c:forEach items="${requestScope.list}" var="l">
        <tr>
            <td>${l.id}</td>
            <td>${l.name}</td>
            <td>${l.sex}</td>
            <td>${l.age}</td>
            <td>${l.rank}</td>
            <td>${l.bumeng}</td>
            <td><a href="/untitled2_war_exploded/DelServlet?id=${l.id}">删除</a></td>
        </tr>
        <td colspan=""><a href="jsp/xinzen.jsp">新增</a></td>
        <td colspan=""><a href="jsp/select.jsp?id=${l.id}&name=${l.name}&sex=${l.sex}&age=${l.age}&rank=${l.rank}&bumeng=${l.bumeng}">修改</a></td>>
    </c:forEach>
    <tr >
        <td colspan="4">
            <a href="/untitled2_war_exploded/chaxvnServlet?pageNo=1">首页</a>
            <c:if test="${pageNo>1}">   <%-- 当前页码大于一 --%>
            <a href="/untitled2_war_exploded/chaxvnServlet?pageNo=${pageNo-1}">上一页</a>
            </c:if>
            <c:if test="${pageNo<pageSize}">
            <a href="/untitled2_war_exploded/chaxvnServlet?pageNo=${pageNo+1}">下一页</a>
            </c:if>
            <a href="/untitled2_war_exploded/chaxvnServlet?pageNo=${pageSize}">尾页</a>
        </td>
    </tr>
</table>
</body>
</html>
